<template>
    <el-table
            :data="tableData"
            stripe
            style="width: 100%">
        <el-table-column
                prop="id"
                label="学号"
        >
        </el-table-column>
        <el-table-column
                prop="account"
                label="账号"
        >
        </el-table-column>
        <el-table-column
                prop="gender"
                label="性别"
        >
        </el-table-column>
        <el-table-column
                prop="name"
                label="名字"
        >
        </el-table-column>
    </el-table>
</template>

<script>
    export default{
        data() {
            return {
                tableData:[]
            }
        },
        created: function () {
            this.$http.get('http://localhost:8081/listall.php')
                    .then((response) => {
                console.log(response.data.data)
            this.tableData = response.data.data

        }).catch(function(response) {
                console.log(response)
            });
        },
    }
</script>

<style lang="scss">

</style>